Skip to content

fix: remove context-path from request URI in DynamicSecurityFilter#955

Open
Senrian wants to merge 1 commit into
macrozheng:masterfrom
Senrian:fix-884-v2
Open

fix: remove context-path from request URI in DynamicSecurityFilter#955
Senrian wants to merge 1 commit into
macrozheng:masterfrom
Senrian:fix-884-v2

Conversation

@Senrian
Copy link
Copy Markdown

@Senrian Senrian commented Apr 3, 2026

Fix #884 - 动态鉴权管理器路径匹配优化

问题

后台资源配置通常不包含 server.servlet.context-path,如果配置了该值,通过 request.getRequestURI() 获取的路径会包含 context-path 前缀,导致路径匹配失败。

修复

request.getRequestURI() 改为 request.getRequestURI().substring(request.getContextPath().length())

修改文件

mall-security/src/main/java/com/macro/mall/security/component/DynamicSecurityFilter.java

Fixes #884

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

动态鉴权管理器路径匹配优化

1 participant